package cz.khfotbal.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cz.khfotbal.dao.DelegatDao;
import cz.khfotbal.domain.Delegat;
import cz.khfotbal.service.DelegatService;

@Service
public class DelegatServiceImpl implements DelegatService {

	@Autowired
	private DelegatDao delegatDao;

	public List<Delegat> getAllDelegats() {
		return delegatDao.findAll();
	}

	public void updateDelegat(Delegat delegat) {
		delegatDao.update(delegat);

	}

	public void createDelegat(Delegat delegat) {
		delegatDao.save(delegat);

	}

}
